// src/components/VersionTimeline.jsx
import React from 'react';
import styles from './VersionTimeline.module.css';

export default function VersionTimeline({ versions }) {
  return (
    <div className={styles.timelineContainer}>
      {versions.map((version, index) => (
        <div key={index} className={styles.timelineItem}>
          <div className={styles.timelineDot} />
          <div className={styles.timelineContent}>
            <h3 className={styles.version}>v{version.version}</h3>
            <time className={styles.date}>{version.date}</time>
            <ul className={styles.changelog}>
              {version.changes.map((change, i) => (
                <li key={i}>{change}</li>
              ))}
            </ul>
          </div>
        </div>
      ))}
    </div>
  );
}